﻿@model VietPremier.Areas.AdminCP.Models.AdminAboutUsModel

@{
    ViewBag.Title = "Edit";
    Layout = "~/Areas/AdminCP/Views/Shared/AdminLayout.cshtml";
}

<script type="text/javascript" src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery-1.7.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Content/cssAdmin/js/plugins/jquery-ui-1.8.16.custom.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.min.js")"></script>
<script type="text/javascript" src="@Url.Content("~/Scripts/jquery.validate.unobtrusive.min.js")"></script>
<script type="text/javascript"  src="@Url.Content("~/ckeditor/ckeditor.js")"></script>
<script type="text/javascript" src="@Url.Content("~/ckfinder/ckfinder.js")"></script>
<script type="text/javascript">
    
    jQuery(document).ready(function () {

        $('#nofSuccess').hide(); // an thong bao
        $('#nofError').hide();      
    });
  
    function SEOvalue() {

        $("#Titletag").val("VietPremier Destination");

        $("#Meta_description").val("VietPremier Destination");

        $("#Meta_keyword").val("VietPremier Destination");

        return false;
    }

    function alertMsg(msg) {
        $('#nofSuccess').hide();
        $('#nofError').show();
        $('#msgNofError').text(msg);
    }

    function checkField() {
       

        return confirm("Do you want to continue to Edit About Information?");
    }

</script>

<div class="maincontentinner">

    <!--maintabmenu-->

    <div class="notification msgsuccess" style="display: none" id="nofSuccess">
        <a class="close"></a>
        <p id="msgNofSuccess">This is a success message.</p>
    </div>
    <!-- notification msgsuccess -->

    <div class="notification msgerror" style="display: none" id="nofError">
        <a class="close"></a>
        <p id="msgNofError">This is an error message.</p>
    </div>
    <!-- notification msgerror -->

    @using (Html.BeginForm("Edit", "AdminAboutUs", FormMethod.Post, new { @id = "formCreate", @class = "stdform stdform2", enctype = "multipart/form-data" }))
    {        
        @Html.HiddenFor(model => model.Id)
        @Html.ValidationSummary();
        <div class="contenttitle radiusbottom0">
            <h2 class="table"><span>Quản lý SEO cho trang Giới thiệu</span></h2>
        </div>
        <p>
            <label>Title </label>
            <span class="field">
                @Html.TextBoxFor(model => model.Titletag)</span>
        </p>

        <p>
            <label>Meta Description </label>
            <span class="field">
                @Html.TextBoxFor(model => model.Meta_description)</span>
        </p>

        <p>
            <label>Meta Keyword </label>
            <span class="field">
                  @Html.TextAreaFor(model => model.Meta_keyword, new { @cols = 80, rows = 5 })</span>
        </p>
         <p class="stdformbutton" style="padding:10px">
         <input type="submit" value="Use The Default SEO" onclick="return SEOvalue()"/>
             </p>
             <div class="contenttitle radiusbottom0">
            <h2 class="table"><span>Thông tin Giới thiệu</span></h2>
        </div>
               
        <p>
            <label>Tên</label>
            <span class="field">
                @Html.TextBoxFor(model => model.Name)
            </span>
        </p>             
        <p>
            <label>Nội dung</label>
            <span class=" field">
                <textarea cols="80" rows="5" name="Body" id="Body" class="longinput">@Model.Body</textarea>
            </span>
            <script type="text/javascript">
                CKEDITOR.replace('Body', {
                    filebrowserBrowseUrl: '/ckfinder/ckfinder.html',
                    filebrowserImageBrowseUrl: '/ckfinder/ckfinder.html?Type=Images',
                    filebrowserFlashBrowseUrl: '/ckfinder/ckfinder.html?Type=Flash',
                    filebrowserUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Files',
                    filebrowserImageUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Images',
                    filebrowserFlashUploadUrl: '/ckfinder/core/connector/php/connector.php?command=QuickUpload&type=Flash'
                });
            </script>
        </p>                    
        <p class="stdformbutton">
            <input type="submit" value="Submit" onclick="return checkField()" />
            <input type="submit" value="Back" onclick="javascript: history.back(); return false" />
        </p>

    }

    <br clear="all" />

</div>